package com.woniu51.search.domain;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @author 杨光
 * @date 2022年04月12日 10:49
 */
@Document(indexName = "woniu51actor",type = "actor",shards = 3,replicas = 1)
public class ActorSearch {


    @Field(type= FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String searchText;

    @Id
    @Field(type=FieldType.Integer,index = false)
    private Integer actorId;

    @Field(type=FieldType.Keyword,index = false)
    private String actorName;

    @Field(type=FieldType.Keyword,index = false)
    private String actorImg;
    @Field(type=FieldType.Keyword,index = false)
    private String actorDesc;
    @Field(type=FieldType.Integer,index = false)
    private Integer followers;
    @Field(type=FieldType.Long,index = false)
    private Long boxOffice;


    @Override
    public String toString() {
        return "ActorSearch{" +
                "searchText='" + searchText + '\'' +
                ", actorId=" + actorId +
                ", actorName='" + actorName + '\'' +
                ", actorImg='" + actorImg + '\'' +
                ", actorDesc='" + actorDesc + '\'' +
                ", followers=" + followers +
                ", boxOffice=" + boxOffice +
                '}';
    }

    public String getSearchText() {
        return searchText;
    }

    public void setSearchText(String searchText) {
        this.searchText = searchText;
    }

    public Integer getActorId() {
        return actorId;
    }

    public void setActorId(Integer actorId) {
        this.actorId = actorId;
    }

    public String getActorName() {
        return actorName;
    }

    public void setActorName(String actorName) {
        this.actorName = actorName;
    }

    public String getActorImg() {
        return actorImg;
    }

    public void setActorImg(String actorImg) {
        this.actorImg = actorImg;
    }

    public String getActorDesc() {
        return actorDesc;
    }

    public void setActorDesc(String actorDesc) {
        this.actorDesc = actorDesc;
    }

    public Integer getFollowers() {
        return followers;
    }

    public void setFollowers(Integer followers) {
        this.followers = followers;
    }

    public Long getBoxOffice() {
        return boxOffice;
    }

    public void setBoxOffice(Long boxOffice) {
        this.boxOffice = boxOffice;
    }
}
